//
//  SEGUhomeMediator+Common.m
//  CommonMediator
//
//  Created by 山刘 on 2019/4/15.
//  Copyright © 2019年 山刘. All rights reserved.
//

#import "SEGUhomeMediator+Common.h"

@implementation SEGUhomeMediator (Common)
-(UINavigationController*)seg_initNavigationController:(NSDictionary*)params{
    UINavigationController* navi = [self performTarget:@"Navi" action:@"initNavigationController" params:params shouldCacheTarget:NO];
    if (!(navi && [navi isKindOfClass:[UINavigationController class]])) {
        navi = [[UINavigationController alloc] init];
    }
    return navi;
}

/**
 * 返回NavigationController类名
 * @author Sam
 */
-(NSString*)seg_getNaviControllerStringClass{
    
    NSString* clsStr = [self performTarget:@"Navi" action:@"getNaviControllerStringClass" params:nil shouldCacheTarget:NO];
    if (!clsStr) {
        return NSStringFromClass(UINavigationController.class);
    }
    return clsStr;
}

/**
 设置开始进行页面埋点记录
 */
-(void)seg_startAnalytics:(NSDictionary*)params{
    [self performTarget:@"Analytics" action:@"startAnalytics" params:params shouldCacheTarget:NO];
}
@end
